import java.util.Arrays;
import java.util.Scanner;
public class Test {




        public static void main1(String[] args) {
            Scanner scanner = new Scanner(System.in);
            /********** Begin *********/
            String data="";
            data=scanner.nextLine();
            String name=scanner.nextLine();

            int idx=0;
            System.out.println(data.indexOf('李'));
//
//            do{
//                idx=data.indexOf(name);
//                if(idx!=-1){
//                    System.out.println(idx);
//                    idx++;
//                }
//            }while(idx!=-1);



            /********** End *********/
        }


    public static void main(String[] args) {

            String filename="hello world.java";
            String[] str=filename.split("\\.")
;
            boolean is=filename.isEmpty();

//       for(String s:str){
//            System.out.println(s);
//        }

        System.out.println(str.length);
        System.out.println(filename.length());
        System.out.println(filename.indexOf("a"));
        System.out.println(filename.lastIndexOf("a"));
    }


    public static void main3(String[] args) {
            String fileName=".java";
            String email="laurenyang@edu.com";

        String[] str=fileName.split("\\.");


        boolean isFileNameValid=false;
        if(str.length>=2&&str[0]!=""){
            String end=str[str.length-1];
            isFileNameValid=end.equals("java");
        }

        System.out.println(isFileNameValid?"Java文件名正确":"Java文件名无效");
        int atIndex=email.indexOf("@");
        int dotIndex=email.indexOf(".");
        int atLastIndex=email.lastIndexOf("@");
        if(atIndex!=-1&&dotIndex!=-1&&atIndex<dotIndex&&atIndex==atLastIndex){
            System.out.println("邮箱名正确");
        }
        else{
            System.out.print("邮箱名无效");
        }
    }
    }

